#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 5e5 + 5;

int n, m;
int a[N];
int bit[N];
int lowbit(int x) { return x & -x; }
void update(int x, int d) {
  for (int i = x; i <= n; i += lowbit(i)) bit[i] += d;
}
int query(int x) {
  int res = 0;
  for (int i = x; i > 0; i -= lowbit(i)) res += bit[i];
  return res;
}
int ans[N];
int ask(int x) {
  int l = x, r = n;
  while (l <= r) {
    int mid = (l + r) >> 1;
    int y = x + query(mid);
    if (y <= mid)
      r = mid - 1;
    else if (y > mid)
      l = mid + 1;
  }
  return l;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  rep(i, 1, n) cin >> a[i];
  per(i, n, 1) {
    int x = ask(a[i]);
    ans[x] = i;
    update(x, 1);
  }
  rep(i, 1, n) cout << ans[i] << ' ';
  return 0;
}